import Vue from 'vue'
import Vuex from 'vuex'
import * as actions from './actions';
import footer from './modules/footer';
import edit from './modules/edit';
import loadings from './modules/loadings';
import user from './modules/user';
import coupon from './modules/coupon';
import money from './modules/money';
import plan from './modules/plan';
import course from './modules/course';
import weekly from './modules/weekly';
import nowDay from './modules/nowDay';


//结果页
import result from './modules/result';



//体重
import weight from './modules/weight';
//身高
import height from './modules/height';
//性别
import sex from './modules/sex';

//健身记录
import jianshen from './modules/jianshen';

// 锻炼界面的自选课程城
import selfcourse from './modules/selfcourse'

// 关注的store
import focus from './modules/focus';




/**
 * https://github.com/vuejs/vue-hackernews-2.0
 * hackernews demo include vuex2
 */
Vue.use(Vuex)

const store = new Vuex.Store({
    /*
    state 和 mutations 写入 modules 中
    // state,
    // mutations,
    */
    actions,
    modules: {
        footer,
        user,
        loadings,
        coupon,
        money,
        plan,
        course,
        weekly,
        edit,
        loadings,
        nowDay,
        weight,
        jianshen,
        height,
        sex,
        result,
        selfcourse,
        focus,
    },
    strict: process.env.NODE_ENV !== 'production' // todo 设置 dev 环境
})

export default store